<template>
	<view class="page">
		<!-- 商品信息 -->
		<view class="goods-list">
			<block v-for='(goodsItem,goodsIndex) in goodslist' :key='goodsIndex'>
				<view class="goods-info">
					<block v-for="(item, index) in goodsItem.goods" :key="index">
						<view class="goods-box bg-white">
							<!-- <view class="merchant-title" @click="navToShop(goodsItem.shop_info)">
				    <view class="text-df flex algin-center" style="align-items: center;">
				      <image class="merchant-icon":src="imgBaseUrl + 'order/merchant.png'" mode="aspectFill" style="width: 40rpx;height: 40rpx;"/>
				      <text>{{goodsItem.shop_info.store_name}} </text>
				      <text class="fu-iconfont merchant-icon-left">&#xe80e;</text>
				    </view>
				  </view> -->
							<view class="good-item">
								<view class="img-box">
									<fu-image :src="item.thumb" mode="aspectFill" radius="16"></fu-image>
								</view>
								<view class="right-info flex flex-direction justify-between">
									<view>
										<view class="title">{{ item.name }}</view>
										<view class="flex align-center margin-top-16">
											<view class="flex align-center margin-right-48">
												<image src="https://localelife.chunchuangkeji.cn/h5img/images/007.png"
													class="fu-block-22 margin-right-6"></image>
												<text class="text-666 font-20" v-if="!is_appointment">无需预约</text>
												<text class="text-666 font-20" v-else>需要预约</text>
											</view>
											<view class="flex align-center margin-right-48" v-if="goodsItem.shop_info">
												<image src="https://localelife.chunchuangkeji.cn/h5img/images/008.png"
													class="fu-block-22 margin-right-6"></image>
												<text class="text-666 font-20">{{goodsItem.shop_info.business_hours}}</text>
											</view>
										</view>
									</view>
									<view class="price-box">

										<view class="price margin-right-16 text-bold" style="color: #FF5C5C;">
											<text class="small">￥</text>
											{{item | filterGoodsPrice}}
										</view>
										<view class="text-through text-999 font-20">
											¥{{item.market_price}}
										</view>
										<!-- <view class="num">x{{ item.number }}</view> -->
										<!-- <view class="number" @tap.stop="">
								    <cart-number-box :min="1" :max="item.stock" :value="item.number" @change="numberChange($event, item, index,goodsIndex)"></cart-number-box>
								  </view> -->
									</view>
								</view>
							</view>
						</view>
						<view class="margin-top-20 bg-white padding-lr-32">
							<view class="flex align-center justify-between solid-bottom" style="padding: 32rpx 0;">
								<view class="font-32 text-333">数量</view>
								<view class="number" @tap.stop="">
									<cart-number-box :min="1" :max="item.stock" :value="item.number"
										@change="numberChange($event, item)"></cart-number-box>
								</view>
								<!-- 修改 -->
								<!-- <view class="number" @tap.stop="" v-if="is_goods_type == 2">
									<cart-number-box :min="1" :max="item.stock" :value="item.number"
										@change="numberChange($event, item)"></cart-number-box>
								</view> -->
								<!-- <view class="number" v-else>{{item.number}}</view> -->
							</view>
							<view class="flex align-center justify-between" style="padding: 32rpx 0;">
								<view class="font-32 text-333">优惠券</view>
								<!-- <view @tap="getCouponList(goodsItem.goods_money  ,goodsItem,goodsItem.shop_info.u_id)" class="item-right flex align-center">
						<view class="coupon-text coupon-money" v-if="goodsItem.coupon_money">
						  {{i18n['优惠']}}{{goodsItem.coupon_money }}{{i18n['元']}}
						</view>
						<view class="coupon-text coupon-money-use" v-else>
						 <text class="" v-if='goodsItem.coupon_usable_num == 0'>
							{{i18n['无可用优惠券']}}
						  </text>
						  <text >
							{{i18n['有']}}{{goodsItem.coupon_usable_num}}{{i18n['张可用优惠券']}}
							{{i18n['选择优惠券']}}
						  </text>
						</view>
						<image class="icon" :src="imgBaseUrl + 'arrow-r.png'"mode=""></image>
					  </view> -->
								<view @tap="getPtCouponList(true)" class="item-right flex align-center">
									<view class="coupon-text coupon-money" v-if="coupon_money">
										优惠{{ coupon_money }}元
									</view>
									<view class="coupon-text coupon-money-use" v-else>
										<text class="" v-if='pt_coupon_list.length == 0'>
											无可用优惠券
										</text>
										<text v-else>
											有{{pt_coupon_list.length}}张可用优惠券
										</text>
									</view>
									<image class="icon" :src="imgBaseUrl + 'arrow-r.png'" mode=""></image>
								</view>
							</view>
						</view>
					</block>

					<view class="margin-top-20 bg-white">
						<view class="solid-bottom font-28 text-666" style="padding: 32rpx;">选择支付方式</view>
						<view style="padding: 8rpx 32rpx;">
							<view class="padding-tb-24 flex align-center justify-between" v-if="is_point">
								<view class="flex align-center">
									<image src="/static/jifen.png" class="fu-block-56 margin-right-24"></image>
									<text class="text-333 font-32">积分抵扣 {{real_reduce_money}}</text>
								</view>
								<switch @change="handleSwitch" color="#00C34B" :checked="integral_reduce.isSelect"></switch>
							</view>
							<view class="padding-tb-24 flex align-center justify-between" v-if="is_point">
								<view class="flex align-center">
									<image src="/static/jifen.png" class="fu-block-56 margin-right-24"></image>
									<text class="text-333 font-32">金币抵扣 {{real_reduce_money}}</text>
								</view>
								<switch @change="handleSwitch" color="#00C34B" :checked="integral_reduce.isSelect"></switch>
							</view>
							<view class="padding-tb-24 flex align-center justify-between" v-if="is_point">
								<view class="flex align-center">
									<image src="/static/jifen.png" class="fu-block-56 margin-right-24"></image>
									<text class="text-333 font-32">喵币抵扣 {{real_reduce_money}}</text>
								</view>
								<switch @change="handleSwitch" color="#00C34B" :checked="integral_reduce.isSelect"></switch>
							</view>
							
							<template v-for="(item, index) in payWaysList">
								<!-- #ifdef MP-WEIXIN -->
								<view class="padding-tb-24 flex align-center justify-between" v-if="item.pay_type == 'wxpay'"
									@click="changePayType(item.pay_type)" :key="index">
									<view class="flex align-center">
										<image src="https://localelife.chunchuangkeji.cn/h5img/images/weixin-3.png"
											class="fu-block-56 margin-right-24"></image>
										<text class="text-333 font-32">{{item.name}}</text>
									</view>
									<view>
										<image class="fu-block-40" :src="imgBaseUrl + 'checked.png'" mode=""
											v-if="payType == item.pay_type"></image>
										<image class="fu-block-40" :src="imgBaseUrl + 'unchecked.png'" mode="" v-else></image>
									</view>
								</view>
								<!-- #endif -->
								<!-- #ifdef APP-PLUS || H5 -->
								<view class="padding-tb-24 flex align-center justify-between" @click="changePayType(item.pay_type)">
									<view class="flex align-center">
										<image :src="imgIcon[item.pay_type]" class="fu-block-56 margin-right-24"></image>
										<text class="text-333 font-32">{{item.name}}</text>
									</view>
									<view>
										<image class="fu-block-40" :src="imgBaseUrl + 'checked.png'" mode=""
											v-if="payType == item.pay_type"></image>
										<image class="fu-block-40" :src="imgBaseUrl + 'unchecked.png'" mode="" v-else></image>
									</view>
								</view>
								<!-- #endif -->
							</template>

						</view>
					</view>

					<view class="margin-top-20 bg-white" style="padding: 32rpx;">
						<view class="title-block flex align-center fu-fs32 text-333 text-bold">
							购买须知
						</view>
						<view class="tips flex align-center margin-top-24">
							<view class="tip flex align-center text-666 margin-right-24 font-20">
								<image src="https://localelife.chunchuangkeji.cn/h5img/images/007.png" class="fu-block-22"
									style="margin-right: 6rpx;"></image>
								<text v-if="is_appointment">需要预约</text>
								<text v-else>无需预约</text>
							</view>
							<view class="tip flex align-center text-666 margin-right-24 font-20" v-if="is_point">
								<image src="https://localelife.chunchuangkeji.cn/h5img/images/007.png" class="fu-block-22"
									style="margin-right: 6rpx;"></image>
								<text>积分抵</text>
							</view>
						</view>
						<view class="text-999 font-24 margin-top-16">
							<view v-html="warm_prompt" style="white-space: pre-wrap;"></view>
						</view>
					</view>
				</view>
			</block>
		</view>
		<!-- 商品信息 end -->
		<!-- 平台优惠券 start -->
		<!-- <view class="order-info">
      <view class="info-box">
        <view class="info-item" v-if='pt_coupon_list.length>0'>
          <view class="item-left">
            <view class="text">平台优惠券</view>
          </view>
          <view @tap="getPtCouponList(true)" class="item-right">
            <view class="coupon-text coupon-money" v-if="coupon_money">
              优惠{{ coupon_money }}元
            </view>
            <view class="coupon-text coupon-money-use" v-else>
              <text class="" v-if='pt_coupon_list.length == 0'>
                无可用优惠券
              </text>
              <text v-else>
                有{{pt_coupon_list.length}}张可用优惠券
              </text>
            </view>
            <image class="icon" :src="imgBaseUrl + 'order/right.png'" mode=""></image>
          </view>
        </view>
      </view>
    </view> -->
		<!-- 平台优惠券 start -->

		<!-- 订单相关信息 end -->
		<!-- 底部总计和按钮 -->
		<view class="footer-bottom">
			<view class="footer-box">
				<view class="left padding-left-sm">
					<view class="text-bold text-333 font-22">
						优惠价：
						<text class="text2" style="color: #FF5C5C;font-size: 32rpx;">
							<text class="text-bold text-df text-price"></text>
							<text class="text-bold ">{{ payable_money }}</text>
						</text>
					</view>
					<view class="font-22 text-bf margin-top-8">已减：<text class="text-through"
							style="font-size: 20rpx;">{{coupon_moneys}}</text></view>
				</view>
				<view class="right" @click="beforeSubmit" style="background-color: #FD9CAE;">立即支付</view>
			</view>
		</view>

		<!-- 底部总计和按钮 end -->
		<!-- 积分兑换弹框 start -->
		<fu-integral-deduction ref="integral" :info="integral_reduce" @hanldeSelect="hanldeSelect">
		</fu-integral-deduction>
		<!-- 积分兑换弹框 end -->
		<!-- 优惠券弹窗 start -->
		<fu-popup v-model="showCoupon" mode="bottom" z-index="100" :safe-area-inset-bottom="true" :border-radius="24"
			ref="popupInvoice">
			<view class="coupon-popup-content">
				<view class="flex justify-between padding-bottom padding">
					<view class="flex-sub text-center couponTitle flex justify-center align-center">
						<image :src="imgBaseUrl + 'shop-circle-left.png'" mode="widthFix" class="image margin-right-sm" />
						<view class="text-xl">{{ i18n['优惠'] }}</view>
						<image :src="imgBaseUrl + 'shop-circle-right.png'" mode="widthFix" class="image margin-left-sm" />
					</view>
					<view class="close-box" @tap="showCoupon = false"><text class="cuIcon-close text-xl text-666"></text></view>
				</view>
				<view class="coupon-wrap-scroll">
					<scroll-view class="fu-tab max-520" scroll-y>
						<view class="margin-bottom-sm" v-for="(item, index) in coupon_list" :key="index">

							<jd-coupon :discountPrice="item.money" :name="item.name" :time="item.end_time"
								:limit="item.min_order_money" :isUse="item.checked" :item="item"
								@click="choose(item, index)"></jd-coupon>
							<!-- @click="receive(item,index,item.is_receive)" -->
						</view>

						<!-- 无数据 start -->
						<view class="kong flex flex-direction justify-center align-center" v-if="hasCoupon">
							<fu-empty-ui :pagingListNoListDataText="i18n['暂无可用优惠券']"></fu-empty-ui>
						</view>
					</scroll-view>
				</view>
			</view>

			<!-- 无数据 end -->
		</fu-popup>
		<!-- 优惠券弹窗 end -->
		<!-- 运费弹窗 start -->
		<fu-popup v-model="showFreight" mode="bottom" z-index="100" :safe-area-inset-bottom="true" :border-radius="24"
			ref="popupInvoice">
			<view class="freight-popup-content">
				<view class="flex justify-between padding-bottom padding">
					<view class="">
						<view class="close-box"><text class="cuIcon-close text-white"></text></view>
					</view>
					<view class="couponTitle flex-sub flex justify-center align-center">
						<image :src="imgBaseUrl + 'shop-circle-left.png'" mode="widthFix" class="image margin-right-sm" />
						<view class="text-center text-xl">{{ i18n['运费说明'] }}</view>
						<image :src="imgBaseUrl + 'shop-circle-right.png'" mode="widthFix" class="image margin-left-sm" />
					</view>
					<view class="close-box" @tap="showFreight = false"><text class="cuIcon-close text-xl text-666"></text></view>
				</view>
				<view class="text-333 text-lg text-weight-500 freight-text-title">
					{{ i18n['运费说明'] }}
				</view>
				<view v-if="freight_explain" class="freight-text" v-html="freight_explain.replace(/\n/g, '<br/>')">
				</view>
				<view v-else class="freight-text">{{ i18n['无'] }}</view>
				<!-- <view class="freight-submit-btn" @click="showFreight = false">{{ i18n['确定'] }}</view> -->
			</view>
		</fu-popup>
		<!-- 运费弹窗 end -->
		<!-- 不在配送范围内商品弹框 start -->
		<fu-popup ref="list_fail_goods" mode="center" border-radius="8" :mask-close-able="false"
			v-model="list_fail_goods_popup">
			<view class="model-notice-box bg-white radius">
				<view class="header text-333 text-bold ">{{i18n['抱歉，以下商品不在配送范围']}}</view>
				<view class="content1  coupon-wrap-scroll">
					<view class="goods_fail_list">
						<view class="item flex" v-for='(item,index) in goods_fail_list'>
							<view class="img-box">
								<view class="img">
									<view class="no-stok">
										<image class="no-stock-img" :src="imgBaseUrl + 'tab/no.png'" mode="">
										</image>
									</view>
									<fu-image :src="item.thumb" mode="aspectFill"></fu-image>
								</view>
							</view>
							<!-- 商品详细信息 -->
							<view class="info-box">
								<view class="info-top">
									<view class="title text-cut">{{ item.name }}</view>
									<view class=" text-sm text-999 key_name " v-if="item.key_name">
										<view class="overFlow_text text-cut">
											<text>{{ item.key_name }}</text>
										</view>
									</view>

								</view>
								<view class="price-box flex justify-between text-sm">
									<view class="price">
										<text class="small">￥</text>
										{{item | filterGoodsPrice}}
									</view>
									<view class="num">x{{ item.num }}</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="flex justify-center bottom">
					<view @click.stop="handleCloseFailGoods" class="bottom_content_1 cu-tag round text-white margin-right">
						{{i18n['更改收货地址']}}
					</view>
					<view @click="back" class="bottom_content cu-tag round text-white bg-theme">
						{{i18n['返回上一页']}}
					</view>
				</view>
			</view>
		</fu-popup>
		<!-- 不在配送范围内商品弹框 end -->
		<!-- 支付密码弹窗 -->
		<fu-pay-keyboard ref="passkeyborad" :show="payShow" :money="orderInfo.payable_money" @close="payClose" @callback="paymentByBalance"></fu-pay-keyboard>
		<!-- 密码错误弹窗 start -->
		<fu-popup ref="passErr" mode="center" width="540" height="360" border-radius="16" :mask-close-able="false"
			v-model="isShow">
			<view class="bg-white padding-top-40 height-360 flex flex-direction justify-between">
				<view class="text-center">
					<view class="text-bold fu-fs32 text-333">{{i18n['提示']}}</view>
					<view class="padding-lr-43 text-333 fu-fs28 margin-top-lg">
						{{errorTip || '未知错误，请重试'}}
					</view>
				</view>
				<view class="solid-top flex align-center text-center fu-fs32 text-bold">
					<view class="padding-tb flex-sub solid-right text-999" @click="forgetPassword">{{i18n['忘记密码']}}</view>
					<view class="padding-tb flex-sub text-theme" @click="again">{{i18n['重试']}}</view>
				</view>
			</view>
		</fu-popup>
		<!-- 密码错误弹窗 end -->

	</view>
</template>

<script>
	import fuIntegralDeduction from '../../components/fu-integral-deduction/index.vue';
	import jdCoupon from '../../components/jd-coupon/jd-coupon.vue';
	import cartNumberBox from '../../components/cart-number-box/cart-number-box';
	import fuPayKeyboard from '../../components/fu-pay-keyboard/fu-pay-keyboard.vue';
	export default {
		components: {
			fuIntegralDeduction,
			jdCoupon,
			cartNumberBox,
			fuPayKeyboard
		},
		data() {
			return {
				imgIcon: { // {Obejct} 支付方式图标
					balance: 'https://oss.tiantianhuoke.com/images/168371455948373.png', // {String} 余额支付
					wxpay: 'https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20220526/1d066923b9b33614a9df47ea787e5af9.png', // {String} 支付宝
					alipay: 'https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20221201/33830ae4892cd61a91208d43cbc103d3.png', // {String} 微信
				},
				list_fail_goods_popup: false,
				goods_fail_list: [],
				rulers: '',
				curCouponInfo: {
					curCouponType: '', // 当前选择的优惠券类型 1 平台 2 店铺
					curCouponShopId: '', // 当前选择的优惠券店铺id
					curCouponId: '' // 当前优惠券id
				},
				remark_list: {}, // 备注信息
				shop_coupon_list: {}, //  使用优惠券
				express_price_list: {}, // 需要运费
				integralModel: false, //积分使用规格
				integral_reduce: {
					is_integral_reduce: 1, //是否存在积分规则 0 不是 1是
					isSelect: true //积分抵扣
				},

				is_pure_integral: 0, //是否为纯积分兑换 0 不是 1是
				sales_integral: 0, //商品积分兑换量
				goodslist: [], //商品信息
				addressData: null, //地址信息
				goods_price: 0, //商品价格
				express_price: 0, //是否存在运费价格
				payable_money: 0, //实付金额
				remark: '', //留言
				order: {}, //订单信息
				coupon: null, //优惠券信息
				use_coupon: 0, // 1使用优惠券 0 未使用了优惠券
				coupon_id: 0, //优惠券id
				coupon_usable_num: 0, // 有多少优惠券可用
				coupon_money: 0, // 优惠金额
				curIndex: -1, //当前选中优惠券下标  默认不选中
				coupon_list: [], //优惠券列表
				pt_coupon_list: [], //平台优惠券列表
				cartData: null, //购物车信息
				shipping_coupon: null, //购物车优惠券信息
				order_type: 3, //订单类型 7预售
				agreePayDeposit: false, //预售不退款协议是否同意  默认不同意
				deposit: 0, //预售定金
				balance: 0, //预售尾款
				presell_etime: '', //预售支付尾款最后时间
				presell_stime: '', //预售支付尾款开始时间
				showFreight: false, //运费开启弹窗
				showCoupon: false, // 优惠券开启弹窗
				invoice_list: {}, //按照店铺开票
				isInvoice: false, //是否已经填写过发票信息，若第一次填写 默认所有店铺发票信息全填 变为true，再次从某个店铺点进去开票则变为修改单个店铺发票信息
				shopIndex: '', //记录点击开票时是第几个店铺，修改发票时便于修改信息
				freight_explain: '', //运费说明，
				invite_code: '',
				allGoodsNum: 0,
				selectGoodsInfo: [],
				hasCoupon: false,
				themeColor: '#B82441',
				share_sign: '',
				payWaysList: [{
						name: '微信支付',
						pay_type: "wxpay"
					},
					{
						name: '支付宝',
						pay_type: "alipay"
					},
					{
						name: '余额',
						pay_type: "balance"
					},
				],
				payType: 'alipay',
				orderInfo: {},
				loading: false,
				payShow: false,
				errorTip: '', //支付失败提示
				is_goods_type: 1,
				isShow: false,
				warm_prompt: '',
				real_reduce_money: 0,
				coupon_moneys: 0,
				isCheck: false,
				is_appointment: 0,
				is_point: 0,
				location: {}
			};
		},
		computed: {

			location() {
				return this.$store.getters.location;
			}
		},
		filters: {
			/**
			 * @description 手机号过滤中间四位用*代替
			 * @param {Number,String} val 手机号
			 */
			filterMobile(val) {
				if (!val) return '';
				return val.substr(0, 3) + '****' + val.substr(-4);
			}
		},
		/**
		 * @description onload接收参数
		 * @param {Object} options 入参
		 */
		onLoad(options) {
			// #ifdef MP-WEIXIN
				this.payType = 'wxpay'
			// #endif
			console.log('create order options', options);
			const {
				type,
				ids,
				invite_code,
				share_sign,
				is_goods_type,
				warm_prompt,
				is_appointment,
				is_point

			} = options;
			// 地址id
			if (options.address_id) {
				this.addressData = {
					address_id: options.address_id
				};
			}
			// 监听地址页重新选择地址后，更新地址id

			if (options.invite_code) {
				this.invite_code = options.invite_code
			}

			if (options.share_sign) {
				this.share_sign = options.share_sign
			}
			if (options.is_goods_type) {
				this.is_goods_type = options.is_goods_type
			}
			if (options.warm_prompt) {
				this.warm_prompt = options.warm_prompt
			}
			this.is_appointment = Number(options.is_appointment) || 0
			this.is_point = Number(options.is_point) || 0
			if (!this.is_point) {
				this.integral_reduce.isSelect = 0
			}

			if (type == 'cart' && ids) {
				this.cartData = options;
				// 获取购物车过来订单详情
				this.get_cart_order_info();
			} else {
				this.order = options;
				//非购物车进来订单详情
				this.get_one_order_info();
			}
			// 接收选择地址信息
			uni.$on('select_address', data => {
				console.log('select_address', data);
				this.addressData = data;
				if (this.cartData) {
					this.get_cart_order_info();
				} else {
					this.get_one_order_info();
				}
			});
			// 接收选择发票信息
			uni.$on('select_invoice', data => {
				console.log("data: ", data);
				let list = [];
				// 若是首次进入把发票信息填入所有店铺
				if (!this.isInvoice) {
					this.goodslist.forEach((item, index) => {
						data.is_invoice = 1
						this.invoice_list[item.shop_info.u_id] = data
						console.log(this.invoice_list, item, '这里来了')
					})
					// this.invoice_list = list;
					console.log(this.invoice_list, '这里来了')
					this.$forceUpdate();
					this.isInvoice = true;
				} else {
					this.invoice_list[this.goodslist[this.shopIndex].shop_info.u_id] = this.$util.deepClone(data);
					this.$forceUpdate();

					console.log(this.invoice_list, '这里来了')
				}


				console.log(this.invoice_list, this.isInvoice);
			});
			// #ifdef APP-PLUS
			this.getHiddenInterface()
			// #endif
		},
		onUnload() {
			// 关闭监听
			uni.$off('select_address');
			uni.$off('select_coupon');
			uni.$off('select_invoice');
		},
		computed: {},
		onShow() {
			// this.payClose();
		},
		methods: {
			// 上架隐藏
			getHiddenInterface(){
				this.$api.post(global.apiUrls.hiddenInterface,{code: 'is_show'}).then(res=>{
					if(res.data.data == 1){
						this.payType = "alipay"
						this.payWaysList = [
							{
								name: '支付宝',
								pay_type: "alipay"
							}
						]
					}else{
						this.payType = "wxpay"
						this.payWaysList = [
								{
									name: '微信支付',
									pay_type: "wxpay"
								},
								{
									name: '支付宝',
									pay_type: "alipay"
								}
						]
					}
				})
			},
			/**
			 * @event
			 * @description 关闭支付密码输入框
			 */
			payClose() {
				this.coupon_money = 0;
				this.coupon_id = 0;
				this.payShow = false;
				this.get_one_order_info();
			},
			/**
			 * @event 点击忘记密码
			 * @description 点击忘记密码
			 */
			forgetPassword() {
				this.$urouter.navigateTo({
					url: "/pages/index/setting/modify-password-verify-phone/index",
					params: {
						type: 1
					}
				})
			},
			again() {
				this.isShow = false;
				this.loading = true;
				this.callPay();
			},
			/** @description 数量改变
			 * @param {Object} e
			 * @param {string} index
			 */
			numberChange(e, goods, index, goodsIndex) {

				if (this.cartData) {


					this.selectGoodsInfo.forEach((item, index) => {
						if (item.id == goods.id && item.sku_id == goods.sku_id) {
							item.num = e
						}
					})

					// this.selectGoodsInfo = goodsInfo
					console.log(this.selectGoodsInfo, 'doodod')
					this.get_cart_order_info(true);
				} else {
					this.order.number = e
					this.get_one_order_info(true);
				}

				// this.number
				// let item = this.cartList[i].cart_list[index];
				// this.$api
				//   .post(global.apiUrls.postSetCartNumber, {
				//     cart_id: item.id,
				//     sku_id: item.sku_id,
				//     num: e
				//   })
				//   .then(res => {
				//     console.log('cart number', res.data);
				//     if (res.data.code == 1) {
				//       this.$set(this.cartList[i].cart_list[index], 'num', e);
				//       this.$store.dispatch('getCartList');
				//     }
				//   });

			},
			handleSwitch(e) {
				console.log(e)
				this.integral_reduce.isSelect = e.detail.value
				this.get_one_order_info();
			},
			changePayType(type) {
				this.payType = type;
			},
			back() {
				uni.navigateBack();
			},
			handleCloseFailGoods() {

				this.list_fail_goods_popup = false;
				setTimeout(() => {
					this.chooseAddress()
				}, 300)
			},
			iptRemark(e, id) {
				this.remark_list[id] = {
					remark: e.detail.value
				};
			},
			applyInvoice(index, id) {
				let url = '/pages/invoice/invoice/apply-invoice/index?type=1';
				this.shopIndex = index;
				// 第一次点击开发票信息，不记录点击的哪个店铺
				if (this.isInvoice) {
					url = url + '&invoice=' + JSON.stringify(this.invoice_list[id]);
				}
				uni.navigateTo({
					url: url
				});
			},
			/**
			 * @description 运费
			 */
			openFreight(data) {
				if (!data) {
					this.$message.info(i18n['未查询到运费说明']);
					return;
				}
				this.freight_explain = data;
				this.showFreight = true;
			},
			// 判断是否为会员价，活动价和商品价
			filterGoodsPrice(value) {
				if (!value) return '';
				let isMember = this.$store.getters.isMember; // 是否是会员
				let isActivity = value.activity_type == undefined || value.activity_type == 0 ? false : true; // 是否是活动
				let member_activity_price = value.member_activity_price ? value.member_activity_price : value
					.activity_price; //会员活动价
				let activity_price = value.activity_price; // 活动价
				let member_price = value.member_price ? value.member_price : value.shop_price; // 会员价
				let shop_price = value.shop_price; // 售卖价
				if (isActivity && isMember) {
					// console.log("会员活动价",member_activity_price);
					return member_activity_price;
				} else if (isActivity && !isMember) {
					// console.log("活动价",activity_price);
					return activity_price;
				} else if (!isActivity && isMember) {
					// console.log("会员价",member_price);
					return member_price;
				} else if (!isActivity && !isMember) {
					// console.log("普通价",shop_price);
					return shop_price;
				}
				return '';
			},

			/**
			 * @description 获取优惠券列表数据
			 */
			getPtCouponList(type) {
				this.coupon_list = []
				if (type) {
					this.showCoupon = true;
				}
				this.$api.post(global.apiUrls.postOrderCanUseCoupon, {
					money: this.coupon_search.moeny,
					category: JSON.stringify(this.coupon_search.category),
					goods: JSON.stringify(this.coupon_search.goods)
				}).then(res => {
					// if (res.data.code == 1) {
					// 	if (res.data.data && res.data.data.length > 0) {
					// 		this.pt_coupon_list = res.data.data;
					// this.coupon_list = res.data.data;

					// 	}
					// }

					if (res.data.code == 1) {
						if (res.data.data.length == 0) {
							this.hasCoupon = true
						} else {
							this.hasCoupon = false
						}
						res.data.data.forEach(item => {
							item.checked = false
						})
						this.pt_coupon_list = res.data.data;
						this.coupon_list = res.data.data;
						// 	// 初始化默认选中的优惠券
						this.initSelected(false, '');
					}
				}).catch(err => {});
			},
			/**
			 * @description 获取优惠券列表数据
			 */
			getCouponList(money, val, id, goods) {
				console.log('==============', money, val, id, goods);
				let data = {
					money: money,
					partner_id: 0,

				}


				if (val) {
					data.partner_id = val.shop_info.u_id

					this.coupon_list = []
					this.showCoupon = true;
					this.$api
						.post(global.apiUrls.postOrderCanUseCoupon, data)
						.then(res => {
							console.log('可用优惠券列表: ', res.data.data);
							if (res.data.code == 1) {
								if (res.data.data.length == 0) {
									this.hasCoupon = true
								} else {
									this.hasCoupon = false
								}
								res.data.data.forEach(item => {
									item.checked = false
								})
								this.coupon_list = res.data.data;
								// 	// 初始化默认选中的优惠券
								this.initSelected(val, id);
							}
						})
						.catch(err => {
							this.isShowLoading = false;
						});
				}
			},
			/**
			 * @description 初始化默认选中的优惠券
			 */
			initSelected(val, id) {
				// val 存在是店铺 不存在是平台
				// 如果没有优惠券id传入  默认就没有选中优惠券
				console.log(val, '初始化优惠券，包含平台及店铺')
				if (val) {
					this.curCouponInfo.curCouponType = 2
					this.curCouponInfo.curCouponShopId = id
					this.coupon_list.forEach((item, index) => {
						if (item.id == this.shop_coupon_list[id].coupon_id) {
							item.checked = true;
							this.curIndex = index;
						} else {
							item.checked = false;
						}
					});
				} else {
					this.curCouponInfo.curCouponType = 1
					this.coupon_list.forEach((item, index) => {
						if (item.id == this.coupon_id) {
							item.checked = true;
							console.log(this.coupon_id, index)
							this.curIndex = index;
						} else {
							item.checked = false;
						}
					});
				}

			},
			// 确认选择优惠券
			confirmCoupon() {
				console.log(this.shop_coupon_list, this.coupon_id, this.curCouponInfo)
				let flag = this.coupon_list.filter(item => {
					return item.checked == true
				})
				if (flag.length == 1) {
					if (this.curCouponInfo.curCouponType == 1) {
						this.coupon_id = flag[0].id
					} else {
						this.shop_coupon_list[this.curCouponInfo.curCouponShopId].coupon_id = flag[0].id
					}
				} else {
					if (this.curCouponInfo.curCouponType == 1) {
						this.coupon_id = 0
					} else {
						this.shop_coupon_list[this.curCouponInfo.curCouponShopId].coupon_id = 0
					}
				}
				if (this.cartData) {
					this.get_cart_order_info(true);
				} else {
					this.get_one_order_info(true);
				}
				this.showCoupon = false
				console.log(this.shop_coupon_list, this.coupon_id)
			},
			/**
			 * @description 切换选中
			 * @param {Object} item 选中数据
			 * @param {Number} idx 选中下标
			 */
			choose(item, idx) {
				console.log(item, idx)
				if (item.checked) {
					item.checked = false;
					this.curIndex = -1;
					this.coupon_money = 0
				} else {
					item.checked = true;
					this.curIndex = idx;
				}
				this.coupon_list.forEach((ele, index) => {
					if (index !== idx) {
						ele.checked = false;
					}
				});
				this.confirmCoupon();
			},
			/**
			 * @description 是否同意预售金额不支持退款
			 */
			changeAgreePayDeposit() {
				this.agreePayDeposit = !this.agreePayDeposit;
			},
			/**
			 * @description 非购物车页面进来获取订单详情
			 */
			get_one_order_info(isRef) {
				uni.showLoading()
				const {
					goods_id,
					sku_id = '',
					number,
					activity_id = 0,

				} = this.order;
				const _data = {
					goods_id: goods_id,
					sku_id: sku_id,
					number: number,
					coupon_id: this.coupon_id || 0,
					address_id: (this.addressData && this.addressData.address_id) || 0,
					activity_id: activity_id,
					isSelect_integral_reduce: this.integral_reduce.isSelect ? 1 : 0
				};

				console.log(this.shop_coupon_list, '优惠券列表啊啊啊啊啊 啊')


				if (JSON.stringify(this.shop_coupon_list) !== '{}') {
					_data.shop_coupon_id = (Object.values(this.shop_coupon_list))[0].coupon_id
					if (_data.shop_coupon_id) {
						_data.shop_use_coupon = 1
					} else {
						_data.shop_use_coupon = 0
					}
				}
				if (_data.coupon_id) {
					_data.use_coupon = 1
				} else {
					_data.use_coupon = 0
				}
				this.$api.post(global.apiUrls.postBuyNowOrderInfo, _data).then(res => {
					console.log('buynow order', res.data);
					uni.hideLoading()
					if (res.data.code == 1) {
						let data = res.data.data;
						if (data.address && !Array.isArray(data.address)) {
							this.addressData = data.address;
						}
						this.goodslist = data.list;
						if (data.coupon) {
							this.coupon_money = data.coupon.money
						}
						this.coupon_usable_num = data.coupon_usable_num
						if (data.coupon_search) {
							this.coupon_search = data.coupon_search;
							this.getPtCouponList(false);
						}
						this.allGoodsNum = 0
						// 店铺优惠券及运费列表初始化
						this.goodslist.forEach((item, index) => {


							this.allGoodsNum += item.goods_num
							//优惠券
							item.remark = ''
							// 运费
							//          this.express_price_list[item.shop_info.u_id] = {
							//            express_price: item.express_price
							//          }
							// this.invoice_list[item.shop_info.u_id] = {
							// 	is_invoice:'0'
							// }
							//          if (!isRef) {

							//            this.shop_coupon_list[item.shop_info.u_id] = {
							//              coupon_id:JSON.stringify(this.shop_coupon_list)!='{}'?this.shop_coupon_list[item.shop_info.u_id].coupon_id:0
							//            }
							//            // 备注
							//            this.remark_list[item.shop_info.u_id] = {
							//              remark: item.remark
							//            }
							//          }
							// this.invoice_list.push({
							//   invoice_type: 1, //1个人2企业
							//   invoice_title: "", //抬头
							//   invoice_company_duty_paragraph: "", //税号
							//   invoice_mobile: "", //联系方式
							//   invoice_email: "", //电子邮件
							//   invoice_is_default: "1", //默认抬头})
							// })
						})
						this.real_reduce_money = data.real_reduce_money
						this.coupon_moneys = data.coupon_money
						// 积分兑换
						this.order_type = data.order_type
						this.integral_reduce.is_integral_reduce = data.is_integral_reduce
						this.integral_reduce.reduce_money = data.reduce_money
						this.integral_reduce.integral_reduce = data.integral_reduce
						this.integral_reduce.score = data.score
						this.integral_reduce.integral_payable_money = data.integral_payable_money
						this.goods_price = res.data.data.order_money;
						this.express_price = res.data.data.express_price;
						this.payable_money = res.data.data.payable_money;

						this.deposit = data.deposit;
						this.balance = data.balance;
						this.presell_etime = data.presell_etime;
						this.presell_stime = data.presell_stime;
					} else {
						if (!isRef) {
							this.$message.info(res.data.msg);
							setTimeout(function() {
								uni.navigateBack();
							}, 800);
						}
					}
					uni.stopPullDownRefresh();
				}).catch(() => {
					uni.hideLoading()
				});
			},
			/**
			 * @description 购物车过来获取订单详情
			 */
			get_cart_order_info(isRef) {
				let _data = {
					cart_ids: this.cartData.ids,
					coupon_id: this.coupon_id || 0,
					address_id: (this.addressData && this.addressData.address_id) || 0,
					is_use_integral: 0,
					is_use_integral: this.integral_reduce.isSelect ? 1 : 0,
					goods_info: JSON.stringify(this.selectGoodsInfo)
				};
				if (JSON.stringify(this.shop_coupon_list) !== '{}') {
					_data.select_coupon = JSON.stringify(this.shop_coupon_list)
					let flag = false;
					// 判断是否选择了店铺优惠券
					(Object.values(this.shop_coupon_list)).forEach(item => {
						if (item.coupon_id) {
							flag = true
							return false
						}
					})
					if (flag) {
						_data.shop_use_coupon = 1
					} else {
						_data.shop_use_coupon = 0
					}
					// 判断是否选择了店铺优惠券 end
				}
				// 判断是否选择了平台优惠券
				if (_data.coupon_id) {
					_data.use_coupon = 1
				} else {
					_data.use_coupon = 0
				}
				this.$api
					.post(global.apiUrls.postCartOrderInfo, _data)
					.then(res => {
						console.log('购物车订单信息: ', res);
						if (res.data.code == 1) {
							let data = res.data.data;

							if (data.list_fail.length > 0) {
								this.list_fail_goods_popup = true
								this.goods_fail_list = data.list_fail
							}
							this.goodslist = data.list;
							if (data.address && !Array.isArray(data.address)) {
								this.addressData = data.address;
							}
							if (this.selectGoodsInfo.length == 0) {
								this.goodslist.forEach((item, index) => {
									item.goods.forEach((goodsItem, goodsIndex) => {
										this.selectGoodsInfo.push({
											id: goodsItem.id,
											sku_id: goodsItem.sku_id,
											num: goodsItem.number
										})
									})
								})
							}

							if (data.coupon) {
								this.coupon_money = data.coupon.money
							}
							this.coupon_usable_num = data.coupon_usable_num
							if (data.coupon_search) {
								this.coupon_search = data.coupon_search;
								this.getPtCouponList(false);
							}

							this.allGoodsNum = 0
							// 店铺优惠券及运费列表初始化
							this.goodslist.forEach((item, index) => {

								this.allGoodsNum += item.goods_num
								item.remark = ''
								//优惠券
								// 运费
								this.express_price_list[item.shop_info.u_id] = {
									express_price: item.express_price
								}

								this.invoice_list[item.shop_info.u_id] = {
									is_invoice: '0'
								}
								if (!isRef) {
									this.shop_coupon_list[item.shop_info.u_id] = {
										coupon_id: 0
									}
									// 备注
									this.remark_list[item.shop_info.u_id] = {
										"remark": item.remark
									}
								}
								// this.invoice_list.push({
								//   invoice_type: 1, //1个人2企业
								//   invoice_title: "", //抬头
								//   invoice_company_duty_paragraph: "", //税号
								//   invoice_mobile: "", //联系方式
								//   invoice_email: "", //电子邮件
								//   invoice_is_default: "1", //默认抬头})
								// })
							})
							// 积分兑换
							this.order_type = data.order_type
							this.integral_reduce.is_integral_reduce = data.is_integral_reduce
							this.integral_reduce.reduce_money = data.reduce_money
							this.integral_reduce.integral_reduce = data.integral_reduce
							this.integral_reduce.score = data.score
							this.integral_reduce.integral_payable_money = data.integral_payable_money
							this.goods_price = res.data.data.order_money;
							this.express_price = res.data.data.express_price;
							this.payable_money = res.data.data.payable_money;
						} else {
							this.$message.info(res.data.msg);
							setTimeout(() => {
								uni.navigateBack();
							}, 800);
						}
						uni.stopPullDownRefresh();
					})
					.catch(err => {
						console.log('err: ' + JSON.stringify(err));
						uni.stopPullDownRefresh();
					});
			},
			/**
			 * @description 选择地址
			 */
			chooseAddress() {

				// uni.navigateTo({
				// 	url:`/pages/user/address/address-list/index?type=1&id=${(this.addressData && this.addressData.address_id) || 0}`
				// })


				this.$urouter.navigateTo({
					url: '/pages/address/address-list/index',
					params: {
						type: 1,
						id: (this.addressData && this.addressData.address_id) || 0
					}
				});
			},
			/**
			 * 显示低分抵扣规则
			 */
			hanndleShowRules() {
				this.$api.post(global.apiUrls.postIntegralDeductionRule, {}).then(res => {
						console.log('规则说明', res);
						if (res.data.code == 1) {
							this.rulers = res.data.data.content
						} else {
							this.$message.info(res.data.msg)
						}

					})
					.catch(err => {
						console.log(err);
					})


				this.integralModel = true
			},
			/**
			 * @description 关闭积分使用规格
			 */
			handleClose() {
				this.integralModel = false;
			},
			/**
			 * @description 打开积分使用规格
			 */
			selectUseIntegral() {
				const that = this;
				if (this.integral_reduce.is_integral_reduce == 1) {
					that.$refs['integral'].open();
				}
			},
			/**
			 * @description 积分抵扣
			 * @param {Boolen} isSelect 是否选择了积分抵扣
			 */
			hanldeSelect(isSelect) {
				this.integral_reduce.isSelect = isSelect;
				console.log(isSelect, '是否选择积分抵扣', this.integral_reduce);
				this.$forceUpdate();
				if (this.cartData) {
					this.get_cart_order_info(true);
				} else {
					this.get_one_order_info(true);
				}
			},
			/**
			 * @description 提交订单之前验证
			 */
			beforeSubmit() {
				// 测试用余额支付
				// this.paymentByBalanceIsSetPass();
				if (this.payType == 'balance') {
					this.paymentByBalanceIsSetPass();
				} else {
					this.handleSubmit()
				}
			},
			// 跳转店铺
			navToShop(shopInfo) {
				this.$urouter.navigateTo({
					url: '/pages/goods/shop/shop/index',
					params: {
						partner_id: shopInfo.u_id
					}
				})
			},
			/**
			 * @description 确认订单 下单
			 */
			handleSubmit() {
				// #ifdef APP-PLUS || H5
				// if (this.payType == 'wxpay') {
				// 	return this.$message.info('暂未开放')
				// }
				// #endif
				const that = this;
				if (this.isCheck) return
				var order_info = {};
				// order_info.address = this.addressData;
				// 将商品信息传给后端
				let newGoods = [];
				this.goodslist.forEach(item => {
					newGoods = newGoods.concat(item.goods)
				})
				order_info.goods = newGoods;
				order_info.express_price = this.express_price;
				// 判断是否开发票  选择开具发票但是不填写信息 也不开发票

				// 活动id
				// if (this.order.activity_id != 0) {
				//   order_info.activity_id = this.order.activity_id;
				// }

				this.location = this.$store.state.location;
				if (!this.is_point) {
					this.integral_reduce.isSelect = 0
				}
				var postdata = {
					isSelect_integral_reduce: this.integral_reduce.isSelect ? 1 : 0,
					// reduce_money: this.integral_reduce.reduce_money,
					order_type: this.order_type,
					order_money: this.goods_price,
					payable_money: this.payable_money,
					coupon_id: this.coupon_id ? this.coupon_id : 0,
					order_info: JSON.stringify(order_info),
					// shop_coupon_list: JSON.stringify(this.shop_coupon_list),
					express_price_list: JSON.stringify(this.express_price_list),
					remark_list: JSON.stringify(this.remark_list),
					lng: this.location.longitude,
					lat: this.location.latitude,
					// invite_code:this.invite_code
				};
				// 优惠券
				// if (this.shipping_coupon) {
				//   postdata.shipping_coupon = this.shipping_coupon.id;
				// }
				// 邀请码
				if (this.share_sign) {
					postdata.share_sign = this.share_sign;
				}

				// console.log("订单提交数据", postdata,this.goodslist);
				// this.goodslist.forEach((val, i) => {
				//   console.log(val.shop_info.member_id)
				//   this.invoice_list[i].member_id = val.shop_info.member_id;
				// })
				// postdata.invoice_list = JSON.stringify(this.invoice_list);
				console.log(postdata);
				this.isCheck = true
				this.$api.post(global.apiUrls.postCreateOrder, postdata).then(res => {
					if (res.data.code == 1) {
						this.$message.info('订单提交成功，请支付…');
						if (this.cartData) {
							uni.$emit('delCartGoods', this.cartData.ids);
						}
						this.$api
							.get(global.apiUrls.getOrderDetail, {
								order_sn: res.data.data.order_sn[0],
								order_type: this.order_type
							})
							.then(response => {
								if (response.data.code != 1) {
									this.$message.info(res.data.msg)
									return
								}
								this.orderInfo = res.data.data
								console.log(this.orderInfo)
								// console.log(response.data.data.pay_status)
								
								if (response.data.data.pay_status == 1) {
									console.log(response.data, 88555, that.integral_reduce.isSelect)
									if (that.integral_reduce.isSelect) {
										//跳转到支付成功
										setTimeout(() => {
											this.$urouter.redirectTo({
												url: '/pages/order/order-process/pay-success/index',
												params: {
													order_sn: res.data.data.order_sn,
													order_type: that.order_type,
													is_appointment: that.is_appointment,
													is_point: that.is_point
												}
											});
										}, 500);
									} else {
										//跳转到积分成功
										setTimeout(() => {
											this.$urouter.redirectTo({
												url: '/pages/order/order-process/pay-success/index',
												params: {
													order_sn: res.data.data.order_sn,
													order_type: that.order_type,
													is_appointment: that.is_appointment,
													is_point: that.is_point
												}
											});
										}, 500);

									}
								} else {
									if (response.data.data.goods_is_sale == 0) {
										this.$message.info(this.i18n['该订单下包含有已下架商品，请重新下单']);
										setTimeout(function() {
											uni.navigateBack({})
										}, 1000)
										return
									}
									this.callPay();
								}
							});
					} else {
						this.isCheck = false
						this.$message.info(res.data.msg);
					}
				});
			},
			/**
			 * @function
			 * @description 判断调用哪种支付方式
			 */
			callPay() {
				// 测试余额支付
				// 	this.payShow = true;
				// this.paymentByBalanceIsSetPass();
				if (this.payType == 'wxpay') {
					console.log('微信',this.orderInfo);
					this.paymentByWxpay(this.orderInfo.order_sn[0]);
				} else if (this.payType == 'alipay') {
					console.log('支付宝支付123123');
					// this.loading = false;
					console.log('订单号', this.orderInfo.order_sn);
					this.paymentByAlipayOrede(this.orderInfo.order_sn[0]);
				} else {
					console.log('余额支付');
					this.payShow = true;
					this.paymentByBalanceIsSetPass();
				}
			},
			/**
			 * @function
			 * @description 余额支付判断是否设置了支付密码
			 */
			paymentByBalanceIsSetPass() {
				this.$api.post(global.apiUrls.isSetPay, {
					pay_money: this.orderInfo.payable_money
				}).then(res => {
					if (res.data.code == 1) {
						if (res.data.data.falg == 1) {
							setTimeout(() => {
								this.isCheck = false
								this.loading = false;
							}, 3000)
							console.log('1231')
							// this.payShow = true;
							this.handleSubmit();
						} else {
							this.$message.info(res.data.msg);
							setTimeout(() => {
								this.isCheck = false
								this.loading = false;
								this.$urouter.navigateTo({
									url: '/pages/index/setting/change-pay-password/index'
								});
							}, 800);
						}
					} else {
						setTimeout(() => {
							this.isCheck = false
							this.loading = false;
						}, 3000)
						this.$message.info(res.data.msg);
					}
				}).catch(err => {
					setTimeout(() => {
						this.isCheck = false
						this.loading = false;
					}, 3000)
				})
			},
			/**
			 * @function
			 * @description 余额支付
			 * @param {String} pass - 用户输入的支付密码
			 */
			paymentByBalance(pass) {
				let that = this
				let query = {
					order_sn: this.orderInfo.order_sn
				}
				if (pass) {
					query.pay_password = pass
				} else {
					query.type = 1
				}
				this.$api.post(global.apiUrls.balancepayOrder, query).then(res => {
					if (res.data.code == 1) {
						uni.hideLoading();
						// this.$message.info('支付成功');
						if (this.$refs.passkeyborad) {
							this.$refs.passkeyborad.close();
							this.$refs.passkeyborad.close();
						}
						if (this.$refs.payfingerprint) {
							this.$refs.payfingerprint.close();
						}
						this.$urouter.redirectTo({
							url: '/pages/order/order-process/pay-success/index',
							params: {
								order_sn: this.orderInfo.order_sn,
								// order_type: this.order_type,
								pay_type: this.payType,
								is_appointment: that.is_appointment,
								is_point: that.is_point
							}
						})
					} else if (res.data.code == 2) {
						this.$message.info(res.data.msg);
						if (this.$refs.passkeyborad) {
							this.$refs.passkeyborad.clear();
							this.$refs.passkeyborad.close();
						}
						if (this.$refs.payfingerprint) {
							this.$refs.payfingerprint.close();
						}
						setTimeout(function() {
							that.$urouter.switchTab('/pages/tab/home/shopindex/index');
						}, 1500)

					} else {
						// this.$message.info(res.data.msg);
						if (this.$refs.passkeyborad) {
							this.$refs.passkeyborad.clear();
							this.$refs.passkeyborad.close();
						}
						if (this.$refs.payfingerprint) {
							this.$refs.payfingerprint.close();
						}
						this.errorTip = res.data.msg;
						this.isShow = true;
					}
				})
			},
			paySuccess(sn) {
				this.$urouter.redirectTo({
					url: '/pages/order/order-process/pay-success/index',
					params: {
						order_sn: sn,
						// order_type: this.order_type,
						pay_type: this.payType,
						is_appointment: this.is_appointment,
						is_point: this.is_point
					}
				})
			},
			/**
			 * @function
			 * @description 微信支付
			 * @param {Object} sn - 订单号
			 */
			paymentByWxpay(sn) {
				this.$api.post(global.apiUrls.wxpayOrder, {
					order_sn: sn,
					// #ifdef APP-PLUS
					minipay: '0',
					// #endif
					// #ifdef MP-WEIXIN
					minipay: '1',
					// #endif
				}).then(res => {
					setTimeout(() => {
						this.isCheck = false
						this.loading = false;
					}, 3000)
					if (res.data.code == 1) {
						let data = res.data.data;
						uni.requestPayment({
							provider: 'wxpay',
							// #ifdef MP-WEIXIN
							timeStamp: data.timeStamp,
							nonceStr: data.nonceStr,
							package: data.package,
							signType: data.signType,
							paySign: data.paySign,
							// #endif
							// #ifdef APP-PLUS
							orderInfo: data,
							// #endif
							success: (e) => {
								if (e.errMsg == 'requestPayment:ok') {
									this.paySuccess(sn);
								}
							},
							fail: (e) => {
								// #ifdef APP-PLUS
								let failMsg = 'requestPayment:fail canceled';
								// #endif
								// #ifndef APP-PLUS
								let failMsg = 'requestPayment:fail cancel';
								// #endif
								if (e.errMsg == failMsg) {
									this.$message.info(this.i18n['取消支付']);
									this.coupon_money = 0;
									this.coupon_id = 0
									this.get_one_order_info(true);
								} else {
									this.$message.info(this.i18n["支付失败,请稍后重试"]);
									this.coupon_money = 0;
									this.coupon_id = 0
									this.get_one_order_info(true);
									this.$message.info("支付失败,原因为: " + e.errMsg);
								}
							},
							complete: () => {
								this.isCheck = false
								this.loading = false;
							}
						});
					} else {
						setTimeout(() => {
							this.isCheck = false
							this.loading = false;
						}, 3000)
						console.log('订单无效',res);
						this.$message.info(this.i18n["订单无效，支付失败!"]);
					}
				}).catch(err => {
					setTimeout(() => {
						this.isCheck = false
						this.loading = false;
					}, 3000)
				})
			},
			/**
			 * @function
			 * @description 支付宝
			 * @param {Object} sn - 订单号
			 */
			paymentByAlipayOrede(sn) {
				console.log('支付宝订单号', sn);
				this.$api.post(global.apiUrls.alipayOrder, {
					order_sn: sn,
				}).then(res => {
					console.log("支付宝支付回调", res);
					if (res.data.code == 1) {
						uni.requestPayment({
							provider: 'alipay',
							orderInfo: res.data.data,
							success: (e) => {
								if (e.errMsg == 'requestPayment:ok') {
									this.paySuccess(sn);
								}
							},
							fail: (e) => {
								if (e.errMsg == 'requestPayment:fail canceled') {
									this.$message.info('取消支付');
								} else {
									this.$message.info("支付失败,请稍后重试");
								}
							},
							complete: () => {
								this.isCheck = false;
							}
						})
					} else {
						this.loading = false;
						this.$message.info(this.i18n["订单无效，支付失败"]);
					}
				}).catch(err => {
					this.loading = false;
					console.log("支付宝支付失败 => ", err);
				})
			},
		},
		onPullDownRefresh() {
			if (this.cartData) {
				this.get_cart_order_info();
			} else {
				this.get_one_order_info();
			}
		}
	};
</script>

<style lang="scss" scoped>
	.page {
		padding-bottom: 140rpx;
		padding-bottom: calc(140rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
	}

	// 地址
	.address {
		.head {
			margin-left: 48rpx;
			display: block;
			width: 60rpx;
			height: 60rpx;
			flex-shrink: 0;
			border-radius: 50%;
		}

		.address-box {
			display: flex;
			flex-direction: column;
			justify-content: center;
			width: 497rpx;
			flex-shrink: 0;

			.p1 {
				display: flex;
				align-items: center;

				.label {
					/* width: 56rpx; */
					padding: 0 5rpx;
					// height: 32rpx;
					background: rgba(105, 139, 255, 0.08);
					border: 1rpx solid #698bff;
					opacity: 1;
					border-radius: 8rpx;
					text-align: center;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 500;
					line-height: 32rpx;
					color: #698bff;
					opacity: 1;
					flex-shrink: 0;
				}

				.text1 {
					margin-left: 16rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					// font-weight: bold;
					line-height: 34rpx;
					color: #333333;
					opacity: 1;
				}

				.text2 {
					margin-left: 32rpx;
					font-size: 28rpx;
					font-family: Lato;
					font-weight: 500;
					line-height: 34rpx;
					color: #333333;
					opacity: 1;
					flex-shrink: 0;
				}
			}

			.p2 {
				margin-top: 16rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: bold;
				line-height: 40rpx;
				color: #333333;
				opacity: 1;
				//两行溢出隐藏
				white-space: normal;
				word-break: break-all;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
			}

			.no-address {
				color: #999;
				font-size: 24rpx;
			}
		}


		.to-icon {
			margin-right: 64rpx;
			display: block;
			width: 12rpx;
			height: 22rpx;
			flex-shrink: 0;
		}
	}

	.bottom_bg {
		width: 702rpx;
		height: 30rpx;
		position: absolute;
		bottom: 0;
		left: 0;

		image {
			height: 6rpx;
			width: 100%;
		}

	}

	.order-info {
		margin: 24rpx 0;
		margin-bottom: 120rpx;
		margin-bottom: calc(120rpx + constant(safe-area-inset-bottom));
		margin-bottom: calc(120rpx + env(safe-area-inset-bottom));
		// width: 702rpx;
		overflow: hidden;
		background: #ffffff;
		opacity: 1;
		border-radius: 24rpx;

		.info-box {
			width: 654rpx;
			margin: 0 auto;
			overflow: hidden;

			.info-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 40rpx;
				margin-bottom: 40rpx;

				.item-left-ipt {
					width: 100%;
				}

				.item-left {
					display: flex;
					align-items: center;

					// 商品总额 优惠券 运费
					.text {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 500;
						line-height: 42rpx;
						color: #333333;
						opacity: 1;
					}

					// 全场满88免运费
					.text2 {
						margin-left: 32rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
					}

					.ipt {
						padding-left: 32rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
						width: 90%;
					}
				}

				.item-right {
					display: flex;
					align-items: center;

					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					line-height: 42rpx;
					color: #333333;
					opacity: 1;
				}
			}
		}
	}

	.goods-list {
		// margin: 0 24rpx 24rpx 24rpx;
	}

	.coupon-text {
		margin-right: 16rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 42rpx;
		color: #bfbfbf;
		opacity: 1;
	}

	.coupon-money {
		background: url($IMG_BASE_URL+'/choose-coupon-bg.png');
		background-color: #FEDCDC;
		// width: 136rpx;
		height: 38rpx;
		line-height: 38rpx;
		background-size: 136rpx 38rpx;
		background-position: center left;
		background-repeat: no-repeat;
		padding-left: 47rpx;
		border-radius: 8rpx;
		// background-size: 100% 100%;
		text-align: right;
		padding-right: 10rpx;
		font-size: 22rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FA2033;

	}

	.icon {
		display: block;
		width: 12rpx;
		height: 24rpx;
		flex-shrink: 0;
	}

	.goods-info {
		// width: 702rpx;
		overflow: hidden;
		background: #F6F7F9;
		opacity: 1;
		border-radius: 16rpx;

		.goods-box {
			position: relative;
			width: 100%;
			overflow: hidden;
			padding: 32rpx;
			opacity: 1;
			height: auto;

			.good-item {
				display: flex;
				// align-items: center;
				justify-content: space-between;

				.img-box {
					width: 160rpx;
					height: 160rpx;
					flex-shrink: 0;
					position: relative;
					border-radius: 16rpx;
					overflow: hidden;
					margin-right: 16rpx;

					.img {
						position: absolute;
						left: 50%;
						top: 50%;
						transform: translateX(-50%) translateY(-50%);
						width: 160rpx;
					}
				}

				.right-info {
					flex: 1;
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.title {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 500;
						line-height: 42rpx;
						color: #333333;
						opacity: 1;
						//两行溢出隐藏
						white-space: normal;
						word-break: break-all;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 2;
					}

					.sku {
						margin-top: 8rpx;
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 33rpx;
						color: #999999;
						opacity: 1;
						//单行溢出隐藏
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						word-break: break-all;
					}

					.price-box {
						width: 100%;
						display: flex;
						align-items: center;

						.price {
							font-size: 32rpx;
							font-family: Oswald;
							font-weight: bold;
							line-height: 36rpx;
							color: #fa2033;
							opacity: 1;

							.small {
								font-size: 22rpx;
							}
						}

						.num {
							font-size: 24rpx;
							font-family: PingFang SC;
							font-weight: 400;
							line-height: 33rpx;
							color: #999999;
							opacity: 1;
						}
					}
				}
			}
		}

		.info-box {
			width: 654rpx;
			margin: 0 auto;
			overflow: hidden;

			.info-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 32rpx;

				.item-left-ipt {
					width: 100%;
				}

				.item-left {
					display: flex;
					align-items: center;

					// 商品总额 优惠券 运费
					.text {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 500;
						line-height: 42rpx;
						color: #333333;
						opacity: 1;
					}

					// 全场满88免运费
					.text2 {
						margin-left: 32rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
					}

					.ipt {
						padding-left: 32rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
						width: 90%;
					}
				}

				.item-right {
					display: flex;
					align-items: center;

					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					line-height: 42rpx;
					color: #333333;
					opacity: 1;

					.coupon-text {
						margin-right: 16rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
					}

					.coupon-money {
						background: url($IMG_BASE_URL+'/order/choose-coupon-bg.png');
						background-color: #FEDCDC;
						// width: 136rpx;
						height: 38rpx;
						line-height: 38rpx;
						background-size: 136rpx 38rpx;
						background-position: center left;
						background-repeat: no-repeat;
						padding-left: 47rpx;
						border-radius: 8rpx;
						// background-size: 100% 100%;
						text-align: right;
						padding-right: 10rpx;
						font-size: 22rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #FA2033;

					}

					.icon {
						display: block;
						width: 12rpx;
						height: 24rpx;
						flex-shrink: 0;
					}
				}
			}
		}

		.info-footer {
			width: 654rpx;
			margin: 45rpx auto 32rpx;
			overflow: hidden;
			display: flex;
			justify-content: flex-end;

			.text1 {
				margin-right: 8rpx;
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				line-height: 42rpx;
				color: #666666;
				opacity: 1;
			}

			.text2 {
				font-size: 32rpx;
				font-family: Oswald;
				font-weight: 500;
				line-height: 36rpx;
				color: #fa2033;
				opacity: 1;

				.small {
					font-size: 22rpx;
				}
			}
		}
	}

	// 底部总计和按钮
	.footer-bottom {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #FFFFFF;
		box-shadow: 0 0 10rpx 10rpx #EEEEEE;
		z-index: 99;
		padding-bottom: 0;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);
	}

	.footer-box {
		height: 108rpx;
		background: #ffffff;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.left {
			.small {
				font-size: 22rpx;
			}
		}

		.right {
			width: 224rpx;
			height: 100%;
			background: #FF5C5C;
			opacity: 1;
			text-align: center;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			line-height: 108rpx;
			// border-radius: 28rpx;
			color: #ffffff;
			opacity: 1;
			// margin-right: 24rpx;
		}
	}



	.coupon-popup-content {
		z-index: 100;
		background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);

		.list {
			padding: 24rpx 24rpx 24rpx;

			.item {
				margin-bottom: 24rpx;
				height: 242rpx;
				border-radius: 16rpx;
				padding: 10rpx;

				.wrap {
					width: 100%;
					height: 100%;
					background-color: #FFFFFF;
					border-radius: 12rpx;
					padding: 0 24rpx;
					display: flex;
					flex-direction: column;
					position: relative;

					.top {
						flex: 1;
						padding: 24rpx 0;
						display: flex;
						align-items: center;

						.roundBox {
							width: 106rpx;
							height: 87rpx;
							overflow: hidden;

							.box {
								width: 106rpx;
								height: 106rpx;
								border-radius: 50%;
								text-align: center;
								line-height: 106rpx;
								color: #FFFFFF;
								font-size: 48rpx;
							}
						}

						.contentBox {
							height: 87rpx;
						}

						.price {
							font-size: 48rpx;
						}
					}

					.bot {
						height: 88rpx;
						display: flex;
						justify-content: space-between;
						align-items: center;

						.tit {
							color: #333333;
							font-size: 24rpx;
						}

						.btn {
							width: 120rpx;
							height: 48rpx;
							border-radius: 8rpx;
							text-align: center;
							line-height: 48rpx;
							font-size: 24rpx;
							color: #FFFFFF;
						}
					}
				}

				.wrap.a::after {
					content: "";
					position: absolute;
					height: 100%;
					width: 10rpx;
					top: 0;
					left: 0;
					background: radial-gradient(circle at 0rpx 30rpx, $theme 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 70rpx, $theme 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 110rpx, $theme 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 150rpx, $theme 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 190rpx, $theme 10rpx, transparent 0);
				}

				.wrap.d::after {
					content: "";
					position: absolute;
					height: 100%;
					width: 10rpx;
					top: 0;
					left: 0;
					background: radial-gradient(circle at 0rpx 30rpx, #BFBFBF 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 70rpx, #BFBFBF 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 110rpx, #BFBFBF 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 150rpx, #BFBFBF 10rpx, transparent 0),
						radial-gradient(circle at 0rpx 190rpx, #BFBFBF 10rpx, transparent 0);
				}

			}

			.canuse {
				background: linear-gradient(126deg, #ff1450 0%, #ff4517 100%);
			}

			.active {
				background-color: $bgtheme;
			}

			.disabled {
				background: #BFBFBF;
			}

			.canuseText {
				color: $theme;
			}

			.disabledText {
				color: #BFBFBF;
			}
		}

		// .coupon-wrap {
		//   padding: 0 24rpx;
		//   box-sizing: border-box;

		//   .coupon {
		//     margin-bottom: 24rpx;
		//     border-radius: 16rpx;
		//     overflow: hidden;
		//     height: 200rpx;

		//     .left {
		//       width: 196rpx;
		//       flex-shrink: 0;
		//       background: #ff6464;
		//       color: #ffffff;

		//       .money {
		//         font-size: 50rpx;
		//         font-weight: 500;
		//         line-height: 78rpx;
		//       }
		//     }

		//     .center {
		//       padding: 0 32rpx;
		//       box-sizing: border-box;
		//       background: #ffffff;
		//       width: calc(100% - 196rpx - 52rpx);
		//     }

		//     ._right {
		//       width: 52rpx;
		//       line-height: 52rpx;
		//       background: #ff6464;
		//       font-size: 24rpx;
		//       font-weight: 400;
		//       color: #ffffff;
		//       text-align: center;
		//       writing-mode: tb-rl;
		//       letter-spacing: 10rpx;
		//     }
		//   }
		// }
	}

	/* 店铺 */
	.merchant-title {
		margin-top: 30rpx;
	}

	.merchant-icon {
		width: 30rpx;
		height: 28rpx;
		// margin-left: 11rpx;
		margin-right: 8rpx;
		top: 2rpx;
	}

	.merchant-icon-left {
		margin-left: 16rpx;
		font-size: 24rpx;
	}

	// 积分弹框 start
	.model-notice-box {
		width: 550rpx;

		.header {
			padding: 40rpx;
			height: 50rpx;
			line-height: 50rpx;
			text-align: center;
		}

		.content {
			margin-top: 20rpx;
			width: 90%;
			margin-left: 5%;

			.height-100 {
				line-height: 40rpx;
			}
		}

		.bottom_content {
			margin: 30rpx 0;
			text-align: center;
			width: 200rpx;
			background: linear-gradient(270deg, rgba(249, 34, 19, 1) 0%, rgba(255, 70, 14, 0.8) 100%);
		}

		.bottom_content_1 {
			margin: 30rpx 0;
			text-align: center;
			width: 200rpx;
			border: 1rpx solid rgba(255, 70, 14, 0.8);
			color: rgba(249, 34, 19, 1);
			background: #fff;
		}
	}

	// 积分弹框 end
	/deep/ uni-switch.checked-green .uni-switch-input {
		background-color: #39b54a !important;
		border-color: #39b54a !important;
		color: #ffffff !important;
	}


	.footer-yy {
		margin: 30rpx 0;
		width: 100%;

		button {
			width: 90%;
			background-color: $fu-main-color !important;
		}
	}

	.coupon-money-use {
		/* color: #fa2033!important; */
	}

	.width-name {
		width: 400rpx;
	}

	.address-empty {
		width: 100%;

		.address-img {
			width: 60rpx;
			height: 60rpx;
			margin-right: 24rpx;
		}

		.no-address {
			font-size: 32rpx;
			font-weight: bold;
			color: #333333;
		}
	}

	.address_1 {
		margin-top: 24rpx;
		//   width: 702rpx;
		padding: 36rpx 0;
		opacity: 1;
		border-radius: 24rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		background: #ffffff;
		position: relative;

	}

	.freight-text {
		margin-right: 16rpx;
		color: #333;
		font-size: 28rpx;
		font-family: PingFang SC;
	}

	.invoice-text {
		margin-right: 16rpx;
		color: #bfbfbf;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
	}

	.couponTitle {
		.image {
			width: 32rpx;
			height: 10rpx;
		}
	}

	.coupon-item {
		height: 45rpx;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 42rpx;
		color: #333333;
		padding: 0 32rpx;
		box-sizing: border-box;
		margin-bottom: 40rpx;

		&:last-child {
			margin-bottom: 96rpx;
		}
	}

	.coupon-wrap-scroll {
		max-height: 520rpx;
		overflow: auto;
		padding: 0 24rpx;
	}

	.max-520 {
		max-height: 520rpx;
	}

	.freight-popup-content {
		position: relative;
		padding-bottom: 156rpx;
		padding-bottom: calc(156rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(156rpx + env(safe-area-inset-bottom));

		.freight-title {
			padding-left: 32rpx;
			// width: 128px;
			// height: 45px;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}

		.freight-text-title {
			padding: 0 32rpx;
			box-sizing: border-box;
		}

		.freight-text {
			padding: 16rpx 32rpx 0rpx 32rpx;
			// width: 686px;
			// height: 209px;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #666666;
		}

		.freight-btn {
			width: 750rpx;
			height: 100rpx;
			background: $bgtheme;
			text-align: center;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 400;
			line-height: 100rpx;
			color: #ffffff;
		}

		.top-box {
			position: relative;
			padding-top: 40rpx;

			.icon-title {
				width: 32rpx;
				height: 10rpx;
			}

			.title {
				font-size: 36rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #333333;
				margin-left: 24rpx;
				margin-right: 24rpx;
			}

			.icon-close {
				position: absolute;
				right: 32rpx;
				top: 50rpx;
				height: 28rpx;
				width: 28rpx;
			}
		}

		.freight-submit-btn {
			width: 100%;
			height: 100rpx;
			background: #F8F8F8;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 400;
			line-height: 100rpx;
			color: #333333;
			text-align: center;
			position: absolute;
			bottom: 0;
			bottom: calc(0rpx + constant(safe-area-inset-bottom));
			bottom: calc(0rpx + env(safe-area-inset-bottom));
			left: 0;
		}
	}

	.margin-right {
		margin-right: 30rpx !important;
	}

	.goods_fail_list {
		margin: 20rpx 0;

		// 商品图片
		.img-box {
			width: 110rpx;
			height: 110rpx;
			flex-shrink: 0;
			margin-left: 24rpx;
			overflow: hidden;
			border-radius: 16rpx;
			position: relative;

			.no-stok {
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translateX(-50%) translateY(-50%);
				width: 148rpx;
				height: 148rpx;
				z-index: 2;
				background: rgba(0, 0, 0, 0.4);
				border-radius: 74rpx;

				display: flex;
				align-items: center;
				justify-content: center;

				.no-stock-text {
					color: #fff;
				}

				.no-stock-img {
					display: block;
					width: 95rpx;
					height: 95rpx;
				}
			}

			.img {
				position: absolute;
				left: 0;
				top: 50%;
				transform: translateY(-50%);
				z-index: 1;
				width: 110rpx;
				height: 110rpx;
			}
		}

		.info-box {
			width: 370rpx;
			margin: 0 auto;
			padding: 0 20rpx;
			overflow: hidden;
			margin-bottom: 40rpx;

			.info-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 40rpx;

				.item-left-ipt {
					width: 100%;
				}

				.item-left {
					display: flex;
					align-items: center;

					// 商品总额 优惠券 运费
					.text {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 500;
						line-height: 42rpx;
						color: #333333;
						opacity: 1;
					}

					// 全场满88免运费
					.text2 {
						margin-left: 32rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
					}

					.ipt {
						padding-left: 32rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
						width: 90%;
					}
				}

				.item-right {
					display: flex;
					align-items: center;

					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					line-height: 42rpx;
					color: #333333;
					opacity: 1;

					.coupon-text {
						margin-right: 16rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 42rpx;
						color: #bfbfbf;
						opacity: 1;
					}

					.coupon-money {
						background: url($IMG_BASE_URL+'/order/choose-coupon-bg.png');
						background-color: #FEDCDC;
						// width: 136rpx;
						height: 38rpx;
						line-height: 38rpx;
						background-size: 136rpx 38rpx;
						background-position: center left;
						background-repeat: no-repeat;
						padding-left: 47rpx;
						border-radius: 8rpx;
						// background-size: 100% 100%;
						text-align: right;
						padding-right: 10rpx;
						font-size: 22rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #FA2033;

					}

					.icon {
						display: block;
						width: 12rpx;
						height: 24rpx;
						flex-shrink: 0;
					}
				}
			}
		}
	}
</style>